sql group by count

join shbcf.ru